package com.clouds.wms.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.clouds.wms.bean.Purmf;
import com.clouds.wms.dao.PurmeDao;
import com.clouds.wms.dao.PurmfDao;
import com.clouds.wms.exception.SysException;
import com.clouds.wms.util.PagesBean;

@Service("purmfService")
public class PurmfServiceImpl implements PurmfService {
	@Resource(name="purmfDao")
	private PurmfDao purmfDao;
	@Resource(name="purmeDao")
	private PurmeDao purmeDao;

	@Override
	public PagesBean getPurmfList(String meaa, String meab, int offset,	int pageSize) throws SysException {
		return purmfDao.getPurmfList(meaa, meab, offset, pageSize);
	}

	@Override
	public int savePurcb(Purmf purmf) throws SysException {
		return purmfDao.savePurcb(purmf);
	}

	@Override
	public int getMaxMfac() throws SysException {
		return purmfDao.getMaxMfac();
	}

	@Override
	public int delPurmf(String mfaa, String mfab, String mfacs)	throws SysException {
		return purmfDao.delPurmf(mfaa, mfab, mfacs);
	}

	@Override
	public int updatePurcb(Purmf purmf) throws SysException {
		return purmfDao.updatePurcb(purmf);
	}

	@Override
	public int changeStatus(String mfaa, String mfab, String status)throws SysException {
		return purmfDao.changeStatus(mfaa, mfab, status);
	}

	@Override
	public void delPurmemf(String meaa, String meab) throws SysException {
		purmeDao.delPurmeByAaAb(meaa, meab);
		purmfDao.delPurmfByAaAb(meaa, meab);
	}

	@Override
	public void delPurmfAll(String meaa, String meab) throws SysException {
		purmfDao.delPurmfByAaAb(meaa, meab);
	}
}
